package cloudgamemysql

import (
	"gorm.io/gorm"
	"time"
)

/*
  @author liubogeng
  @date   2024/8/5 13:05
*/

// CGRole 角色表
type CGRole struct {
	ID        int64          `json:"id" gorm:"column:id;type:bigint;primaryKey;autoIncrement;comment:ID"`
	RoleName  string         `json:"role_name" gorm:"column:role_name;type:varchar(256);not null;default:'';comment:角色名字"`
	Status    int            `json:"status" gorm:"column:status;type:tinyint;default:0;not null;comment:0为正常 1为封禁"`
	CreatedAt time.Time      `json:"created_at" gorm:"column:created_at;type:datetime;comment:该条记录创建时间"`
	UpdatedAt time.Time      `json:"updated_at" gorm:"column:updated_at;type:datetime;comment:该条记录修改时间"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index;type:datetime;comment:该条记录删除时间"`
}

func (CGRole) TableName() string {
	return "cg_role"
}
